package com.infojarda.gbasedwiki.web.client.services;

import java.util.ArrayList;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.infojarda.gbasedwiki.web.client.dtos.WikiPageDTO;

public interface WikiServiceAsync {
	/**
	 * This method is the assynch service interface declaration for the create wikipage service call.
	 */
	void createWikiPage(WikiPageDTO wikiPageDTO, AsyncCallback<Long> callback);
	void readWikiPages(AsyncCallback<ArrayList<WikiPageDTO>> callback);
	void deleteWikiPage(Long id, AsyncCallback<String> callback);
	/**
	 * This method is the Asynchronous Service declaration of the service call that is 
	 * responsible to Retrieve one WikiPageDTO object from the Datastore
	 */
	void getWikiPage(Long id, AsyncCallback<WikiPageDTO> callback);
	/**
	 * This is the asynch interface of the update service
	 * @param wikiPage
	 * @param callback
	 */
	void updateWikiPage(WikiPageDTO wikiPage, AsyncCallback<String> callback);
	/**
	 * Async for getRootWikiPages service call.
	 */
	void getRootWikiPages(AsyncCallback<ArrayList<WikiPageDTO>> callback);
}
